The present invention relates to data mirroring in high available storage solutions, and more specifically to sequential write of random workload in mirroring performance pool environments.
A spinning hard disk drive uses one or more spinning surfaces on which concentric tracks of data are written and read by physical read/write heads. The heads must be moved radially inward and outward to read data on different tracks, and within a track the head has to wait for the desired data location to move under the head before it can be written or read. This introduces a time delay into the read or write process.
If data is physically stored sequentially on the disk, the sequential read time may be minimized because the head does not need to move and there is no waiting for the disk to move the head to the data. However, if the data is not sequential when it is written (which is usually the case) the read/write time is greatly increased because of the necessity to move the head and wait for the particular data location needed to move into position. If the data is written as it comes in random order, the write time is minimized, but if the data is to be read out sequentially the read process is slowed substantially because of the necessity to move the head and wait for the particular data location needed to move into position.
In conventional mirrored storage setups, a first storage system stores data and the same data is simultaneously written to a second storage system, which functions as “mirror” or image copy of the data on the first storage system. The mirrored data is available for backup and/or disaster recovery.
For both the first storage system and the second storage system, the disk controller of the system writes the data in an “ordered” manner—the term “ordered manner” being defined as keeping consecutive data blocks physically adjacent to each other so that sequential read time is minimized. In order to maintain the ordered arrangement of the data, when an update is made to an already written block, an actuator and read/write head must move to the original block position and rewrite the block to apply the update. While keeping the data in an ordered manner minimized sequential read time, writing the random data to the disk in an ordered manner consumes a lot of write time.
When the data is written in a mirrored system, the final write acknowledgement has to be provided from both of the systems before the next write request can proceed, and therefore there is a lag time between the two systems. Conventional setups therefore work most efficiently if the two storage systems implement two similar technologies, because if the second (mirror) storage system writes slower than the first (primary) storage system, the overall write performance is limited to the speed of the slower of the two systems. However, for reasons of cost, it is sometimes desirable to use a high-cost but very fast storage device (for example, a solid state drive (SSD)) for primary storage, and a low-cost but slower storage device (for example, a spinning hard disk drive (HDD)) for the backup or mirror drive.
If the high-speed SSD drive has to wait for the mirrored data to be written to the slower HDD, the advantage of the higher speed of the SSD can be lost.
Alternatively, instead of writing simultaneously to both storage devices, data may written first to a high-speed storage system such as an SSD. Once the data is on the SSD, the system is notified of the write completion and the data is copied from the SSD to a second, slower storage system such as an HDD. The disadvantage to writing incoming data in this manner is that if something happens which interrupts or prevents the later copying of the data to the mirror, the second storage system will have different (older) data stored than the primary drive it is supposed to be mirroring.